package com.xbongbong.paas.domain.entity;

import com.xbongbong.paas.enums.DelEnum;
import com.xbongbong.paas.toolbox.util.DateTimeUtil;
import com.xbongbong.paas.toolbox.wrap.Entity;
import lombok.Getter;
import lombok.Setter;

/**
 *
 * @author 魏荣杰
 * @date 2021/3/2 13:48
 * @since
 * @version
 */
@Getter
@Setter
public class AttrTrashEntity extends Entity {

    private static final long serialVersionUID = 7192710206169123305L;

    /**
     * 主键
     */
    private Long id;
    /**
     * 公司id
     */
    private String corpid;
    /**
     * 应用id
     */
    private Long appId;
    /**
     * 菜单id
     */
    private Long menuId;
    /**
     * 表单id
     */
    private Long formId;
    /**
     * 标记 1：saas；2：paas
     */
    private Integer saasMark;
    /**
     * saas业务类型
     */
    private Integer businessType;
    /**
     * 字段attr值
     */
    private String attr;
    /**
     * 恢复标记，0未恢复，1已恢复
     */
    private Integer recover;
    /**
     * 创建者id
     */
    private String creatorId;
    /**
     * 创建时间时间戳
     */
    private Long addTime;
    /**
     * 更新时间时间戳
     */
    private Long updateTime;
    /**
     * 删除标记
     */
    private Integer del;

    public AttrTrashEntity() {
    }

    public AttrTrashEntity(String corpid, Long appId, Long menuId, Long formId, String attr, String creatorId) {
        this.corpid = corpid;
        this.appId = appId;
        this.menuId = menuId;
        this.formId = formId;
        this.attr = attr;
        this.creatorId = creatorId;
        this.recover = 0;
        this.del = DelEnum.NORMAL.getDel();
    }

    public AttrTrashEntity(String corpid, Long appId, Long menuId, Long formId, Integer saasMark, Integer businessType, String attr, String creatorId) {
        this.corpid = corpid;
        this.appId = appId;
        this.menuId = menuId;
        this.formId = formId;
        this.saasMark = saasMark;
        this.businessType = businessType;
        this.attr = attr;
        this.creatorId = creatorId;
        this.recover = 0;
        this.del = DelEnum.NORMAL.getDel();
        long now = DateTimeUtil.getInt();
        this.addTime = now;
        this.updateTime = now;
    }
}
